package org.grayrabbit.web.struts2;

public abstract class GenericAction extends SimpleActionSupport {
    private static final long  serialVersionUID = -4958036099343849180L;

    /** 进行CUD操作后,以redirect方式重新打开action默认页的result名. */
    public static final String RELOAD           = "reload";

    /** action list方法默认的result名. */
    public static final String LIST             = "list";

    /**返回到页面的 状态*/
    public static final String STATUS           = "status";

    /**返回到页面的 JSON提示信息*/
    public static final String MESSAGE          = "message";

    /** 列表页面中，选择框主键id */
    protected Long[]         key;

    /**
     * Action函数,默认action函数，默认指向list函数.
     */
    @Override
    public String execute() {
        return LIST;
    }

    public Long[] getKey() {
        return key;
    }

    public void setKey(Long[] key) {
        this.key = key;
    }

}
